//------------------------------------------------------------------------------
// Copyright (c) 2012 by Silicon Laboratories.
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Silicon Laboratories End User
// License Agreement which accompanies this distribution, and is available at
// http://developer.silabs.com/legal/version/v10/License_Agreement_v10.htm
// Original content and implementation provided by Silicon Laboratories.
//------------------------------------------------------------------------------

//==============================================================================
// WARNING:
//
// This file is auto-generated by AppBuilder and should not be modified.
// Any hand modifications will be lost if the project is regenerated
//==============================================================================

// INCLUDE ALL GENERATED HEADERS
#include "gModes.h"
#include "gRTC0.h"
#include "gUart0.h"
#include "gPB.h"
#include "gCpu.h"
#include "gSPI1.h"

//==============================================================================
//MODE FUNCTIONS
//==============================================================================
void gModes_enter_async_uart_apb_mode()
{
  // SETUP CPU
  gCpu_enter_default_config();

  // SETUP Ports
  gPB_enter_default_config();

  // SETUP UART
  gUART0_enter_async_apb_config();
  
    SPI1_enter_default_mode_from_reset();
}

//------------------------------------------------------------------------------
void gModes_enter_async_uart_rtc_mode()
{
  // SETUP CPU
  gCpu_enter_default_config();

  // SETUP Ports
  gPB_enter_default_config();

  // SETUP RTC
  gRTC0_enter_time_config();

  // SETUP UART
  gUART0_enter_async_rtc_config();

  SPI1_enter_default_mode_from_reset();
}

//------------------------------------------------------------------------------
void gModes_enter_my_off_mode()
{
  // SETUP UART
  gUART0_enter_off_config();

  // SETUP RTC
  gRTC0_enter_off_config();

  // SETUP Ports
  gPB_enter_off_config();
}
//---eof------------------------------------------------------------------------
